<!doctype html>
<html lang="zh-CN">

<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
	<meta name="description"
		content="OneinStack是一键PHP/JAVA安装脚本工具,包含lnmp,lamp,lnmpa,ltmp,lnmh,MySQL,PostgreSQL,MongoDB等">
	<meta name="author" content="yeho">
	<title>欢迎您使用OneinStack</title>
	<link href="https://linuxeye.com/image/ois.css" rel="stylesheet">
</head>

<body>
	<nav class="navbar navbar-dark fixed-top bg-dark flex-md-nowrap p-0 shadow">
		<a class="navbar-brand col-sm-3 col-md-2 mr-0" href="">OneinStack</a>

		<form class="w-100" action="https://oneinstack.com/qa/" method="GET" target="_blank">
			<input class="form-control form-control-dark w-100" type="text" placeholder="搜索OneinStack官网问答"
				aria-label="搜索OneinStack官网问答" name="qs">
		</form>

		<ul class="navbar-nav px-3">
			<li class="nav-item text-nowrap">
				<a class="nav-link" href="https://oneinstack.com" target="_blank">OneinStack官网</a>
			</li>
		</ul>
	</nav>

	<div class="container-fluid">
		<div class="row">
			<nav class="col-md-2 d-none d-md-block bg-light sidebar">
				<div class="sidebar-sticky">
					<ul class="nav flex-column">
						<li class="nav-item">
							<a class="nav-link active" href="###home" id="home_link">
								<span data-feather="home"></span>
								控制中心 <span class="sr-only">(current)</span>
							</a>
						</li>
						<!--<li class="nav-item">
                <a class="nav-link" href="###step" id="step_link">
                  <span data-feather="file"></span>
                </a>
              </li>-->
						<li class="nav-item">
							<a class="nav-link" href="###vhost" id="vhost_link">
								<span data-feather="layers"></span>
								虚拟主机管理
							</a>
						</li>
						<li class="nav-item">
							<a class="nav-link" href="###db" id="db_link">
								<span data-feather="shopping-cart"></span>
								数据库管理
							</a>
						</li>
						<li class="nav-item">
							<a class="nav-link" href="###ftp" id="ftp_link">
								<span data-feather="users"></span>
								FTP管理
							</a>
						</li>
						<li class="nav-item">
							<a class="nav-link" href="###tools" id="tools_link">
								<span data-feather="briefcase"></span>
								运维工具
							</a>
						</li>
						<li class="nav-item">
							<a class="nav-link" href="###manage" id="manage_link">
								<span data-feather="bar-chart-2"></span>
								管理服务
							</a>
						</li>
						<li class="nav-item">
							<a class="nav-link" href="###backup" id="backup_link">
								<span data-feather="disc"></span>
								备份
							</a>
						</li>
						<li class="nav-item">
							<a class="nav-link" href="###upgrade" id="upgrade_link">
								<span data-feather="trending-up"></span>
								升级 & 卸载
							</a>
						</li>
						<li class="nav-item">
							<a class="nav-link" href="###port" id="port_link">
								<span data-feather="cloud"></span>
								端口开放教程
							</a>
						</li>
						<li class="nav-item">
							<a class="nav-link" href="###donation" id="donation_link">
								<span data-feather="heart"></span>
								捐赠
							</a>
						</li>
					</ul>
				</div>
			</nav>

			<main role="main" class="col-md-9 ml-sm-auto col-lg-10 px-4">

				<div
					class="d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom">
					<h1 class="h2" id="home">控制中心</h1>
					<div class="btn-toolbar mb-2 mb-md-0">
						<div class="btn-group mr-2">
							<a class="btn btn-sm btn-outline-primary btn_prober" href="xprober.php"
								target="_blank"><span data-feather="compass"></span> 探针</a>
							<a class="btn btn-sm btn-outline-info btn_phpinfo" href="phpinfo.php" target="_blank"><span
									data-feather="info"></span> phpinfo</a>
							<a class="btn btn-sm btn-outline-secondary btn_op" href="ocp.php" target="_blank"><span
									data-feather="cpu"></span> Opcache</a>
						</div>
						<a class="btn btn-sm btn-outline-warning mr-2 btn_pma" href="phpMyAdmin/" target="_blank">
							<span data-feather="database"></span> phpMyAdmin
						</a>
					</div>
				</div>

				<section class="section" id="home_section">
					<h2>Congratulations, OneinStack installed successfully!</h2>
					<h3><a
							href="https://linuxeye.com/"
							target="_blank">Linux</a>+Nginx/Tengine+MySQL/MariaDB/Percona</br>+PHP+Pureftpd+phpMyAdmin+redis+memcached+jemalloc.
					</h3>

				</section>

				<section class="section" id="tools_section">
					<h2 class="mt-5" id="tools">主机工具</h2>
					<a class="btn btn-primary btn_prober" href="xprober.php" target="_blank" role="button">探针</a>
					<a class="btn btn-info btn_phpinfo" href="phpinfo.php" target="_blank" role="button">phpinfo</a>
					<a class="btn btn-success btn_pma" href="phpMyAdmin/" target="_blank" role="button">phpMyAdmin</a>
					<a class="btn btn-secondary btn_op" href="ocp.php" target="_blank" role="button">Opcache</a>
				</section>

				<section class="section" id="step_section">
					<h2 class="mt-5" id="step">基本使用步骤</h2>
					<div class="card-deck mb-3 text-center">
						<div class="card mb-4 box-shadow">
							<div class="card-header">
								<h4 class="my-0 font-weight-normal">域名解析</h4>
							</div>
							<div class="card-body">
								<h1 class="card-title pricing-card-title">域名<small class="text-muted">控制</small></h1>
								<ul class="list-unstyled mt-3 mb-4">
									<li>阿里云(万网)</li>
									<li>DNSPOD</li>
									<li>Cloudflare</li>
								</ul>
								<a href="https://help.aliyun.com/document_detail/29716.html" target="_blank" type="role"
									class="btn btn-lg btn-block btn-primary">详细教程</a>
							</div>
						</div>
						<div class="card mb-4 box-shadow">
							<div class="card-header">
								<h4 class="my-0 font-weight-normal">新建虚拟主机</h4>
							</div>
							<div class="card-body">
								<h1 class="card-title pricing-card-title">建立<small class="text-muted">网站</small></h1>
								<ul class="list-unstyled mt-3 mb-4">
									<li>新建虚拟主机 ./vhost.sh</li>
									<li>删除虚拟主机 ./vhost.sh --del</li>
									<li>管理FTP账号 ./pureftpd_vhost.sh</li>
								</ul>
								<a href="https://oneinstack.com/install/" target="_blank" type="role"
									class="btn btn-lg btn-block btn-primary">详细教程</a>
							</div>
						</div>
						<div class="card mb-4 box-shadow">
							<div class="card-header">
								<h4 class="my-0 font-weight-normal">部署网站</h4>
							</div>
							<div class="card-body">
								<h1 class="card-title pricing-card-title">上线<small class="text-muted">运行</small></h1>
								<ul class="list-unstyled mt-3 mb-4">
									<li><a href="phpMyAdmin/" target="_blank">phpMyAdmin</a></li>
									<li>管理FTP账号 ./pureftpd_vhost.sh</li>
									<li>备份 ./backup_setup.sh</li>
								</ul>
								<a href="https://oneinstack.com/install/" target="_blank" type="role"
									class="btn btn-lg btn-block btn-primary">详细教程</a>
							</div>
						</div>
					</div>
				</section>

				<section class="section" id="vhost_section">
					<h2 class="mt-5" id="vhost">如何添加虚拟主机?</h2>
					<div class="alert alert-success" role="alert">
						<pre>
[root@WeiLiu ~]# sudo /root/oneinstack/vhost.sh

#######################################################################
#######################################################################

What Are You Doing?
        1. Use HTTP Only  #注解: 1. 仅配置http
        2. Use your own SSL Certificate and Key  #注解: 2. 自己购买ssl替换，自动配置http、https
        3. Use Let's Encrypt to Create SSL Certificate and Key  #注解: 3. Let's 免费证书，自动配置http、https
        q. Exit  #注解: 4. 退出
Please input the correct option: 3

Please input domain(example: www.example.com): demo.linuxeye.com  #注解: 添加的虚拟主机域名
domain=demo.linuxeye.com

Please input the directory for the domain:demo.linuxeye.com :
(Default directory: /data/wwwroot/demo.linuxeye.com):             #注解: 网站根目录(绝对路径)
Virtual Host Directory=/data/wwwroot/demo.linuxeye.com

Create Virtul Host directory......
set permissions of Virtual Host directory......

Do you want to add more domain name? [y/n]: y  #注解: 是否添加更多域名或IP访问同一个网站根目录

Type domainname or IP(example: example.com other.example.com): demo2.linuxeye.com  #注解: 输入域名或IP(添加多个以空格隔开)
domain list=demo2.linuxeye.com

Do you want to redirect from demo2.linuxeye.com to demo.linuxeye.com? [y/n]: y  
#注解: 是否设置301跳转，浏览器访问demo2.linuxeye.com时，强制跳转至demo.linuxeye.com

Do you want to redirect all HTTP requests to HTTPS? [y/n]: y  #注解: 是否设置http强制跳转至https协议

Please select domain cert key length.
Enter one of 2048, 3072, 4096, 8192 will issue a RSA cert.
Enter one of ec-256, ec-384, ec-521 will issue a ECC cert.

Please enter your cert key length (default 2048): 2048  #注解: 申请免费证书加密长度

Please enter your email: lj2007331@mail.com  #注解: 输入邮箱

[Sun Oct 30 04:27:06 PM CST 2022] Create account key ok.
[Sun Oct 30 04:27:06 PM CST 2022] No EAB credentials found for ZeroSSL, let's get one
[Sun Oct 30 04:27:13 PM CST 2022] Registering account: https://acme.zerossl.com/v2/DV90
[Sun Oct 30 04:27:15 PM CST 2022] Could not get nonce, let's try again.
[Sun Oct 30 04:27:39 PM CST 2022] Registered
[Sun Oct 30 04:27:39 PM CST 2022] ACCOUNT_THUMBPRINT='LMG4Elq-AFm-IH17QAk3yjmp-8TNoxi__gWTIIT1tzY'
....
[Sun Oct 30 04:28:20 PM CST 2022] Cert success.

nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful

Do you want to add hotlink protection? [y/n]: n  #注解: 是否设置防盗链

Allow Rewrite rule? [y/n]: y  #注解: 是否设置伪静态

Please input the rewrite of programme :
wordpress,opencart,magento2,drupal,joomla,codeigniter,laravel
thinkphp,pathinfo,discuz,typecho,ecshop,nextcloud,zblog,whmcs rewrite was exist.
(Default rewrite: other): wordpress  #注解: 显示为内置为伪静态规则（可手工输入名字），文件位置：/usr/local/nginx/conf/rewrite/wordpress.conf
You choose rewrite=wordpress

Allow Nginx/Tengine/OpenResty access_log? [y/n]: y  #注解: 是否记录访问日志
You access log file=/data/wwwlogs/demo.linuxeye.com_nginx.log

nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful
Reload Nginx......

#######################################################################
#######################################################################
Your domain:                  demo.linuxeye.com
Virtualhost conf:             /usr/local/nginx/conf/vhost/demo.linuxeye.com.conf
Directory of:                 /data/wwwroot/demo.linuxeye.com
Rewrite rule:                 /usr/local/nginx/conf/rewrite/wordpress.conf
Let's Encrypt SSL Certificate:/usr/local/nginx/conf/ssl/demo.linuxeye.com.crt
SSL Private Key:              /usr/local/nginx/conf/ssl/demo.linuxeye.com.key

</pre>
					</div>

					<h2 class="mt-5">如何删除虚拟主机?</h2>
					<div class="alert alert-success" role="alert">
						<pre>
[root@WeiLiu ~]# sudo /root/oneinstack/vhost.sh --del

#######################################################################
#######################################################################

Virtualhost list:  #注解: 已经绑定域名
demo1.linuxeye.com demo.linuxeye.com www.linuxeye.com

Please input a domain you want to delete: demo.linuxeye.com  #注解: 删除demo.linuxeye.com域名虚拟主机

Do you want to delete Virtul Host directory? [y/n]: y  #注解: 是否删除网站根目录，注意备份
Press Ctrl+c to cancel or Press any key to continue...  #注解: 按Ctrl+c取消，人已经继续执行

Domain: demo.linuxeye.com has been deleted.

</pre>
					</div>

				</section>

				<section class="section" id="ftp_section">
					<h2 class="mt-5">FTP客户端推荐</h2>
					<h3>FileZilla: <a href="https://filezilla-project.org/download.php" target="_blank"
							class="links">下载地址</a></h3>
					<h2 class="mt-5" id="ftp">如何管理FTP账号?</h2>
					<div class="alert alert-success" role="alert">
						<pre>
[root@WeiLiu ~]# sudo /root/oneinstack/pureftpd_vhost.sh

#######################################################################
#                 FTP virtual user account management                 #
#######################################################################

What Are You Doing?
        1. UserAdd      #注解: 添加Ftp账号
        2. UserMod      #注解: 更改某个Ftp账号根目录权限
        3. UserPasswd   #注解: 更改某个Ftp密码
        4. UserDel      #注解: 删除某个Ftp账号
        5. ListAllUser  #注解: 列出所有Ftp账号
        6. ShowUser     #注解: 显示某个Ftp账号详情
        q. Exit         #注解: 退出（字母q）
Please input the correct option: 1

Please input a username: ftpuser

Please input the password: UArUDjLZ12HD

Please input the directory(Default directory: /data/wwwroot):    #注解: ftpuser用户根目录，建议默认，可直接回车
Password: 
Enter it again: 
#####################################

[ftpuser] create successful! 

You user name is : ftpuser
You Password is : UArUDjLZ12HD
You directory is : /data/wwwroot
</pre>
					</div>

				</section>

				<section class="section" id="db_section">
					<h2 class="mt-5" id="db">数据库</h2>
					<div class="list-group">
						<a href="phpMyAdmin" target="_blank" class="list-group-item list-group-item-action active">
							phpMyAdmin
						</a>
						<a href="https://oneinstack.com/question/17347/" target="_blank"
							class="list-group-item list-group-item-action">如何获取MySQL root密码?</a>
						<a href="https://oneinstack.com/question/oneinstack-how-to-configure-mysql-remote-connection/"
							target="_blank" class="list-group-item list-group-item-action">如何配置MySQL远程连接?</a>
					</div>
				</section>

				<section class="section" id="backup_section">
					<h2 class="mt-5" id="backup">如何备份?</h2>
					<div class="alert alert-success" role="alert">
						<pre>
[root@WeiLiu ~]# sudo /root/oneinstack/backup_setup.sh #设置备份参数

#######################################################################
#                     Setup the backup parameters                     #
#######################################################################

Please select your backup destination:
        1. Localhost     #解析: 1. 本地备份
        2. Remote host   #解析: 2. 远程备份(ssh)
        3. Aliyun OSS    #解析: 3. 阿里云OSS备份
        4. Qcloud COS    #解析: 4. 腾讯云COS备份
        5. UPYUN         #解析: 5. 又拍云备份
        6. QINIU         #解析: 6. 七牛云备份
        7. Amazon S3     #解析: 7. 亚马孙S3备份
        8. Dropbox       #解析: 8. Dropbox备份
Please input numbers:(Default 1 press Enter) 1

Please select your backup content:
        1. Only Database
        2. Only Website
        3. Database and Website
Please input a number:(Default 1 press Enter) 1  #解析: 选择备份数据库

Please enter the directory for save the backup file: 
(Default directory: /data/backup):   #解析: 本地或远程备份目录

Please enter a valid backup number of days: 
(Default days: 5): 10  #解析: 备份保留天数

Please enter one or more name for database, separate multiple database names with commas: 
(Default database: linuxeye,weiliu) weiliu,linuxeye  #解析: 备份数据库，以逗号隔开

You have to backup the content:
Database: weiliu,linuxeye

</pre>
					</div>
					<div class="alert alert-success" role="alert">
						<pre>
sudo /root/oneinstack/backup.sh #立即备份
</pre>
					</div>
					<div class="alert alert-success" role="alert">
						<pre>
sudo echo '0 1 * * * sudo /root/oneinstack/backup.sh > /dev/null 2>&1' >> /var/spool/cron/root #设置计划任务自动定时备份, 设置每天凌晨一点备份
</pre>
					</div>
				</section>

				<section class="section" id="manage_section">
					<h2 class="mt-5" id="manage">如何管理服务?</h2>
					<p class="mt-4">Nginx/Tengine/OpenResty:</p>
					<div class="alert alert-primary" role="alert">
						<code>systemctl {start|stop|status|restart|reload} nginx</code></div>
					<p class="mt-4">MySQL/MariaDB/Percona:</p>
					<div class="alert alert-primary" role="alert">
						<code>systemctl {start|stop|restart|reload|status} mysqld</code></div>
					<p class="mt-4">PostgreSQL:</p>
					<div class="alert alert-primary" role="alert">
						<code>systemctl {start|stop|restart|status} postgresql</code></div>
					<p class="mt-4">MongoDB:</p>
					<div class="alert alert-primary" role="alert">
						<code>systemctl {start|stop|status|restart|reload} mongod</code></div>
					<p class="mt-4">PHP:</p>
					<div class="alert alert-primary" role="alert">
						<code>systemctl {start|stop|restart|reload|status} php-fpm</code></div>
					<p class="mt-4">Apache:</p>
					<div class="alert alert-primary" role="alert"><code>systemctl {start|restart|stop} httpd</code>
					</div>
					<p class="mt-4">Tomcat:</p>
					<div class="alert alert-primary" role="alert">
						<code>systemctl {start|stop|status|restart} tomcat</code></div>
					<p class="mt-4">Pure-Ftpd:</p>
					<div class="alert alert-primary" role="alert">
						<code>systemctl {start|stop|restart|status} pureftpd</code></div>
					<p class="mt-4">Redis:</p>
					<div class="alert alert-primary" role="alert">
						<code>systemctl {start|stop|status|restart|reload} redis-server</code></div>
					<p class="mt-4">Memcached:</p>
					<div class="alert alert-primary" role="alert">
						<code>systemctl {start|stop|status|restart|reload} memcached</code></div>
				</section>

				<section class="section" id="upgrade_section">
					<h2 class="mt-5" id="upgrade">如何更新版本?</h2>
					<div class="alert alert-success" role="alert">
						<pre>
[root@WeiLiu ~]# /root/oneinstack/upgrade.sh 

#######################################################################
#              Upgrade Software versions for OneinStack               #
#######################################################################

What Are You Doing?
         1. Upgrade Nginx/Tengine/OpenResty
         2. Upgrade Apache
         3. Upgrade Tomcat
         4. Upgrade MySQL/MariaDB/Percona
         5. Upgrade PHP
         6. Upgrade Redis
         7. Upgrade Memcached
         8. Upgrade phpMyAdmin
         9. Upgrade OneinStack latest
        10. Upgrade acme.sh latest
         q. Exit

Please input the correct option:

</pre>
					</div>
					<h2 class="mt-5">如何卸载?</h2>
					<div class="alert alert-success" role="alert">
						<pre>
[root@WeiLiu ~]# /root/oneinstack/uninstall.sh #注意备份

#######################################################################
#                         Uninstall OneinStack                        #
#######################################################################

What Are You Doing?
         0. Uninstall All
         1. Uninstall Nginx/Tengine/OpenResty/Apache/Tomcat
         2. Uninstall MySQL/MariaDB/Percona
         3. Uninstall PostgreSQL
         4. Uninstall MongoDB
         5. Uninstall all PHP
         6. Uninstall PHP opcode cache
         7. Uninstall PHP extensions
         8. Uninstall PureFtpd
         9. Uninstall Redis
        10. Uninstall Memcached
        11. Uninstall phpMyAdmin
        12. Uninstall Nodejs (PATH: /usr/local/node)
         q. Exit

Please input the correct option: 
</pre>
					</div>
				</section>

				<section class="section" id="port_section">
					<!--<h2 class="mt-5" id="port">云主机安全组端口开放教程<span class="badge badge-secondary">Version 1.0.0</span></h2>-->
					<div class="card text-white bg-danger" style="width: 18rem;">
						<div class="card-header">
							云主机安全组必须打开如下端口:
						</div>
						<ul class="list-group list-group-flush">
							<li class="list-group-item text-danger">ssh: 22</li>
							<li class="list-group-item text-danger">http: 80</li>
							<li class="list-group-item text-danger">https: 443</li>
							<li class="list-group-item text-danger">ftp: 21, 20000~30000</li>
						</ul>
					</div>
					<div class="list-group mt-5" style="width: 18rem;">
						<a class="list-group-item list-group-item-action active">
							云主机安全组端口开放教程
						</a>
						<a href="https://oneinstack.com/docs/securitygroup/#11" target="_blank"
							class="list-group-item list-group-item-action">阿里云安全组端口</a>
						<a href="https://oneinstack.com/docs/securitygroup/#12" target="_blank"
							class="list-group-item list-group-item-action">腾讯云安全组端口</a>
						<a href="https://oneinstack.com/docs/securitygroup/#13" target="_blank"
							class="list-group-item list-group-item-action">华为云安全组端口</a>
					</div>
				</section>
				<section class="section" id="donation_section">
					<p>PayPal: lj2007331@gmail.com ; 支付宝：lj2007331@gmail.com , 手机客户端扫描二维码捐赠：<br>
						<a href="https://paypal.me/yeho" target="_blank" rel="noopener noreferrer"><img
								layer-src="https://img.shields.io/badge/Paypal-donate-green.svg"
								src="https://img.shields.io/badge/Paypal-donate-green.svg" alt="《捐赠》"
								layer-index="0"></a>
						<img class="img-fluid"
							src=""
							alt="《捐赠》"><br>
					</p>
				</section>

				<div align="center" class="mt-5"><iframe src="https://linuxeye.com/image/ad_buttom.html" width="475"
					frameborder="0" scrolling="no"></iframe></div>
			<div>
					<p>
						QQ群:&nbsp;&nbsp; 262601796(新) 558540514(付费千人群)</a>
					</p>
					<p align="right"><a href="#">回顶部</a></p>
				</div>
			</main>
		</div>
	</div>
	<script src="https://linuxeye.com/image/ois.js"></script>
</body>

</html>